import api from '.'

export function axios(options) {
    let {method='get',data} = options
    if(method==='get') {
        options.params = data
    }
    return api(options).catch(error=>{error})
} 

export function post(url,options) {
    return api.post(url,{...options})
} 

export function get(url,options) {
    let {data} = options
    options.params = data
    return api.get(url,{...options})
} 